//
//  SFiveTableViewCell.m
//  PocketFM
//
//  Created by sun on 15/12/16.
//  Copyright © 2015年 Sun. All rights reserved.
//

#import "SFiveTableViewCell.h"
#import <UIButton+WebCache.h>
#import "ListCategoryModel.h"
#import "ThemeModel.h"
@interface SFiveTableViewCell()
@property (weak, nonatomic) IBOutlet UILabel *cardTitle;
@property (weak, nonatomic) IBOutlet UIButton *icon;

@end
@implementation SFiveTableViewCell
+ (instancetype)cellWithTabelView:(UITableView *)tableView{
    static NSString *ID = @"SFiveTableViewCell";
    SFiveTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:ID];
    if (!cell) {
        cell = [[[NSBundle mainBundle] loadNibNamed:@"SFiveTableViewCell" owner:nil options:nil] lastObject];
    }
    [cell setSelectionStyle:UITableViewCellSelectionStyleNone];
    return cell;
}
- (void)setModel:(ListCategoryModel *)model{
    _model = model;
    self.cardTitle.text = model.cardTitle;
    ThemeModel *mod = model.themeArray[0];
    [self.icon sd_setImageWithURL:[NSURL URLWithString:mod.img640_292] forState:UIControlStateNormal];
    NSLog(@"-----------%@", mod.img640_292);
}

@end
